package edu.noteBook.dao;

import edu.noteBook.Pojo.Note;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NoteDao {

    List<Note> queryAllNote(@Param("offset") Integer offset , @Param("limit") Integer limit);

    List<Note> queryAllNote1(@Param("offset") Integer offset , @Param("limit") Integer limit, @Param("username") Integer username);


    List<Note> queryNoteByTitle(String title);

//    @Select("select * from note where type = #{type}")
    List<Note> queryNoteByType(Integer type);

//    @Select("select * from note where id = #{id}")
    Note queryNoteById(Integer id);

    boolean addNote(Note note);

    boolean deleteNote(Integer id);

    boolean updateNote(Note note);
}
